On the previous.
Sessions are you have doubts or you have something not clear?
Good.
So let's continue with today's session.
We have one hour today, Karen, go ahead, please.
OK.
So I'm going to start by sharing my screen so that we can we can start where we left yesterday.
Yes, I hope you.
My goodness.
On your side now.
Yes, yes.
Yes.
Good, good.
So is that we are trying to we are using postmen and we were trying to get some data to get some data.
When we have passed our parameter to our function, we are getting some issue.
I found what the issue was, something small it's about.
We don't have permissions, we need to pass the key here, let me just allow guest to remember we did
this ritual of getting which was getting all the members.
And giving us giving us our this this response now, we needed to pass we needed to pass some kind of
query so that we can only get one member in response here.
So what I did, I read I wrote this other function.
And I think I need to increase the funding.
Yeah, so we wrote this other function yesterday.
So it was not working because this one was not surrounded by this this this quote, so you need to surround
this by only one quote here and now if we if we try to assess if we try to access this function.
So basically here what we are seeing is the full name and email address from that name.
We have the name, the name remembering.
They are caught on tape, which is used as the primary key is the member I.D. and the member I.D. to
test.
I have had code that this one here, some member idea of hardcoded here and then have returned to that
as a dictionary.
So if not, we go to our method.
This is the get get member method and since we are getting only one member whose I.D. is what we have
provided here.
So if if we change this to two and the same and we go back to Posman, you see this is Jofre Garani.
If we say no, we get money back.
And it sounds like someone had a cousin.
OK, so now looking at it, one more thing I would like us to do really well, you do actually will
never do applications where you are hard coding the query parameters like this.
So what you do this this item, you pass it here as a parameter and then you don't need this.
So you pass out as a parameter or your function.
And then what is going to happen is now when you are pulling this function, you need to parse this
as a parameter.
So right now, if I go to back to my to boost my data center, this is going to give me this error,
telling me that git member is missing one required positional argument.
And when you see that, you you know that you are supposed to pass an argument here when you are sending
because our function is stalled, we have got pull you have told our codes to define our function for
the member get member, which takes one parameter inside, that is the member ID.
And then when you get that, go ahead and query the database using that member ID.
So we need to pass this member ID be with our with our, our, our query here in New York this.
So in the bottom section you can select from data, you can also send any other forms that you like
here.
And then you say you put this and then you can go ahead and put whatever was here in me and let me see
this one.
If you can go ahead and pass it here.
So now this one is being passed as a parameter and when you send this is supposed to get the same results.
So this one now is being passed as a parameter to our function and then our function is going ahead
and getting the data, using, using, using these parameters passed.
So if we send it here, we are going to get is the remember whose idea is this one?
What if we send out an idea that doesn't exist in the table, like for we don't have the table, we
are getting a message that is blank.
So so to get the proper response here, what you can do is you can just write the Python code that you
have been writing here and maybe see if this member has something like you will do is sorry.
This is Python is Will written written this this one here.
But then if there is nothing on this one, maybe written a message, you saying something like member
doesn't exist or something like that.
And then you say you know and you come to our our code here and run it, you get this message thing
you remember doesn't exist.
Anyone with a question?
So, Karen, you put this body and yesterday you use Indra headers, the post office yesterday, you
Henderson.
Yeah, I had this one yesterday.
We used a header because we were passing authorization talking.
So today, for instance, we remove using our function is open to be accessed by guests here, which
is of course, most of the functions are going to be writing, will not be open like that.
So if I try to access the same function like that, no, it's this one like that is going to give me
an error, even if it is still has this body.
So this one is fine, but we are not authorized to access that.
If you look, this is telling you that you do not have permission to do that permission error.
So the head does.
Why?
This is the authorization that we are passing and then I can copy it from the answer is good.
I hope it's there and it's not there.
So we can go ahead and generate another one.
So we go back to our code.
No, it's not clear, it's clear, but my question is yes, and he understand you use it to enter the
keys and the bodies you use for barometer's, correct?
Correct, correct.
But yet someone had the question.
Yes.
Karani, could you throw an exception in the Python code instead of returning a message just to see
how it's get sent to the client?
So an exemption, you mean we write like a trained catchable over here?
Here, instead of returning a member doesn't exist, you should throw an exception through a therapy,
throw error, no frappé, throw up it.
Um, uh, let me see.
Forbidden fruit.
Um, I'm not sure I'm not I'm not sure about that.
Let me see.
Uh, I'm not sure about that.
Who has that question?
Beyond, I'm not very sure about that.
So maybe that's something that we can we can use as everyone's assignment, you can go and try to throw
to throw another exception instead of instead of returning the message here, you can throw an exception
here.
Again, this is something that we can also surrounded a try and catch block to be able to manage our
air areas properly.
But exceptions are being returned to the client.
Yes, yes, they will be done to the client.
Yes, OK, yes.
And second question, could you if you set no idea parameters equal, none to make it optional.
Yes.
Yes, you can.
You can do that.
So then you can call it without sending the member, right?
Absolutely.
Yeah, you can do that.
Good.
Thank you.
You're welcome.
Thank you.
I didn't get that last option.
What do you think?
Let me just go here and remove remove this and then I remove this to demo that save if you send the
piece, is going to tell you you are missing one required parameter.
OK, but if you you make this optional, you can pass a member ID, which is none.
And then when you send this request, it's going to walk.
Yeah, but the reason he's doing it this is because it is it is being passed here and then this square
is not returning the appropriate response.
But if you have option optional parameters that you want to pass, you can you can you can you can give
it this option here at the member.
It is not mandatory.
It's going to be non.
It doesn't mean when it is not it doesn't mean all.
What it means is member ID is not mandatory.
You must not pass me by.
I do.
And you are calling this function.
It is optional.
OK, but if it is optional and it is not specified, that means we are asking to get all members, not
one.
No, no, no, no, no, no, no, no.
Because you see the quota here specific.
This one maybe will be used when when you will be doing some other things here with those parameters.
Not quitting, not quitting like this.
Or maybe when you have multiple query parameters.
But this one, it is none.
Remember, this query string is telling our code to get the member whose name is this one.
So if it defines null, he is not going to return, is going to return nothing.
And if you want to get it or if it is non-specified, remember I did it.
Yeah, well, yeah, if you want to get all you used up with the first one.
Remember, we have this Four-Square here.
Where you are not specifying where whatever, you just query everything from the database.
You didn't get me Garani.
I said no idea, is there as a barometer, OK, good.
Yes, he.
He entered.
No, I knew he will fight for that number, if not Andrew Finch or.
Now, what you can do, maybe you can give up on this one here, that if the member idea specified,
run this query, if it is not run, they have a query.
Yeah, it's not in the air condition in the air.
No, no, no.
It's not in here.
Yes and no.
I don't think you can put it here because this is this is a squirrel.
So I don't I'm not sure.
Ask you.
It has the capacity to handle that.
I think I would think the best way to do is to before you run the query, check whether maybe it has
something if it doesn't just get everything from the database.
OK, fine.
Go ahead.
Yeah, great.
To that person.
OK, so the other thing you remember.
Let me go back to this query, since you remember that we are seeing someone asked why we are passing
this as DECT here.
And I said it is because of the key and value, key and value of the response.
So this being the key and this being the value.
So if you return this kind of response today to the developer handling another application, like a
mobile app, this would be very easy to consume because they knew exactly what is.
Joffre, what is this?
What is this?
They know that the email address, the full name and all that.
This is because this one is returning a dictionary if you removed this option here.
Conceived and then introduced interface, you see you see what it is returning, it is returning the
data, but, you know, there are no keys here, so it will be very difficult for you to know what these
are.
Oh, yeah.
So if if we came here, for instance, and removed this and put asterisks and saved and then we sent
out.
So you don't know you don't know what this is.
You don't look like now you have administrator, administrator, so which is which you are not sure
what is weird, but with the addict there, you can now remove this again and you see the whole difference
just because of that tiny piece of code.
So now here we can see the first administrator is modified by this one is the owner and everything else
is organized properly.
Questions on that.
Good, we can move on to the next item.
I think a few days ago you are looking at we were looking at the ad changing.
Let me go to our library library.
Remember, at least when we were here, we wanted someone asked how we can we can we can change this
value and this thing gets updated automatically.
I found out around.
So what I did in.
What I did, cannot I use their first name and this even on their own accord here, there's this option
that we have here, the field name, and then you are calling it as a method.
So I called the name field name here.
Then I passed a function which picks the form and then I collect the first name and a last name like
this.
And then I said the for the value, just like we did here.
But here we did on refresh this one we had done on refresh this one we are doing on change of this value.
So if we come here to our hour up here now and try to change this, you see this changing.
Come on.
Yes, yeah, so if if I if I do hear me, because, yes, this is this is what we are asking last time
about it.
That's very good.
Yeah.
And so the only recurrent the only problem I have found with it is, is that you have to it's like listening
to only one field in the end.
That's true because you see, it's only picking a field, one field.
So for me to be able to get also the change in this other field name, I had to write another one here
for the last name.
So I am not listening to the change in the last name and I'm not changing in the first inning.
So that's how you do it.
But it is speaking only that one field.
So here you put the field name.
Any change in the name on that field will reflect this this code.
Yes, yes, yes, so everything we have a change in the first name, it's running this function and
all this company is doing is that it is collecting their last name and first name and last name, and
then it is setting the value of the full name to this concatenated with that.
OK, this is, again, local level, it's not in the database, no, no, no, it's not yet in the database.
If we change this to something like a mommy is sorry and then we leave it there and refresh, get lost.
You see us returning here.
It is toothpaste, for instance, appetite, and then we save that one has been saved.
So if you refresh, it's not going to get lost there.
Great.
Excellent.
OK, so I don't know whether there's anyone with a question on that.
I have a question currently I am doing some exercise before the system, but when I write some Python
code and I do refresh page, it is not getting the new code I have to restart.
So what is the best practice you are using to try to get the new code in the right position?
So if
so, if you will, if you are writing this is JavaScript code, remember, if it is JavaScript code,
devastated runs on the on the on deck, on the on the front end.
So you do not need to restart your page for it to to pick the changes that you have written.
But if it is, it is Python code, for instance, the writing APIs sometimes do just not peak until
when you restart the result page.
Yeah, it's sometimes that requires arteries that veins, and it is actually a device that everything
you write in a patient could just restart the bench, to be sure.
Sometimes it works if you do reload the page, it works something, sometimes it has those frappé keeps
changing.
It is actually very, very dynamic.
So sometimes you mean stolen up like now this this who these quotes that I hear, this quote that you
are being required to put here is that they are not required if you are a few days ago.
But yesterday when I tried to run this code without them, it couldn't work.
So it's like there's an update we have done and sometimes they do an update and then you need you need
to adhere to some some small changes that they have done that actually affect the way your new installations
are going to be working.
So for bench, sometimes if they want without having to restart, other times you have to restart.
So Mummie for you to be safe to do know that that's really what good is getting fixed and to know whether
maybe for instance, you have some bug just is not a bench anytime you change by the code.
OK.
OK, thank you.
You.
Can you show me your bench console.
Yes, this one and.
While you review it, go into your visual studio code and do a change and save, I think we will see
if it gets gets compiled again in the Consolo issue.
Yeah, and when you say so, also they remove the wrong only here to remove this.
So saying it is this one is being compiled, so you see.
Yeah, so sometimes this doesn't work, frap is very dynamic, keeps changing every day.
So sometimes it will work, other times it doesn't work.
It in Milwaukee in some instances in yesterday.
Then today, Minnesota Vikings Mark.
Sorry, I've got you.
What did you read in this screen, so Benza when you call this screen in the left.
Yeah, this is this one.
Yeah, what do you call this?
This is a bench console.
This is what is running bench.
OK, bench concern.
So when you you see your Eurocorps there in a visual call, what you are reading in pencil concerned
what you did, you did.
So when you take this, you are going to see like now if I return Benan divisive.
Just look at this at the end here.
Yes.
We hit control and s uh this one was not compiled controls has not is so let me remove it again to test
remove save non-competing now or maybe just repeat restart.
Make sure that it is started successfully.
Then you make a change here, save it.
It's not complaining.
This is strange.
Yeah, for one second, so to be very sure that your changes are being reflected, just that it is not
anything to change by the.
OK, so let's try again, save rather restart.
We'll try it out loud noise we got you.
OK, OK, great, but that's not a big issue, of course, restarting, which is not it's not a lot.
So we can can do that time we change.
Be just a simple question when you go to the bicycle or go to Python.
Yes.
Here you said member details.
Member details.
It's a right.
Remember details?
Yes, it is a variable, it's a variable.
It in the front page, don't be Escorial.
This one is what is called in Frappier terminology.
What do you call this?
This is a function similar to what?
Now, this this one is a combination of things, because this is the this is the this is what we have
imported here.
It's like our whole our whole library, OK, DBE DBI, I think it's a function I think is something
like Amadeu and then is given is the function and then this function expects you now to pass you a query.
So this one is Robiskie Will.
OK, because I think in this there is any kind of method similar to the debate, the screen, so so
when I said I believe, I said I want to know the key word.
What what is this going to do?
To me?
It probably means it is probably what they call this.
If you look for queries, let me confirm.
I think you can you can look for frappé queries, deep queries.
And Gregory.
Scrapie million.
Deep queries like last time you put frappé through right profit from it, and now it's the DP, that
this creates another myth, I guess.
Rapido Askew.
Well, the DP could be the method.
Yeah, then this one is a function.
Well, I I'm sure I'm no, I'm not.
No, no, no, no, Scruby.
Yes, it contained many millions, I guess.
Yes.
This one has a lot of things.
Yes.
Because you have to draw.
So when you import the proper here, we import everything that ships the.
So now you can come here to draw to it in such a way that the architecture is going to understand what
you are doing here.
You can do it all through.
You can do for a bit of message, print and all that.
So my question now, we don't know in therapy how much it or how many millions are there.
So my question, we don't know sometimes we don't know some it exist or not if we can get a list of
all missing and therefore I bet it will be helpful.
So the documentation is going to be very handy there, because ideally I do not frappé being opensource,
I do not even think even Rosapepe knows all of them.
I know.
I mean, if you can point us to the river where we can find a list of this, um, from the documentation,
anything you need to know within family to the documentation and then you just decide what you are looking
for.
Like, you know, you want to make to to print the message.
You can just look for something.
You can just come here and type message.
And then he is going to suggest for you everything that is in here, both messages.
And maybe if the list is not complete, if you just you just click on, like, for instance, if you
need message dialogues and all this.
So if you come here and type database, for instance, and see what we have, not yet.
We have things, database things.
All these things are here.
Database API.
So from there from the ah from the documentation's.
It is an awesome bar on top.
You can just actually if you do not get what you are looking for, just Google what you are looking
for, like know how to make BP queries and properly and you will see everything from these that we have
our forum here.
There is another other thing.
So there is everything on on the Internet about that.
OK.
OK, because we need to know how we search.
Yeah.
If you can in any other programming language.
Yeah.
Well although Frappier has not been here for very long, so you may be needing to reach out to someone
who has an experience doing it.
If you just decide something online, chances are 90 percent you're going to get it or we'll the question.
Yes.
Can you debug your Python code with Breakpoint so the the code breaking, then you can inspect variables
and stuff like that?
Absolutely.
So once you are in the Python code, you hear the code that you write here, other than the input from
the input stuff that are that are standard to be, everything you are going to do here is just in the
python.
Do you you can write.
There's no limit to whatever kind of python who can write here.
So anything that you can do with standard Python, you can do it here.
There's no limitation.
No, I mean, if you put a breakpoint here, how can we break and inspect variables?
To debug our code, is it possible or.
Yes.
Have you done it in Python?
No, I'm asking the question if it's possible to to do that.
It is possible is.
So if you put a breakpoint in a studio code, it will break there when it's called or.
So I do not I'm not very sure whether I'm getting your question, but what you mean is if the court
finds that it's not able to execute for some reason, you no know, for debugging.
If you go on line 11 and you put a breakpoint on that line, I would like the debugger to to break and
then we can inspect value like we do in the JavaScript console.
You put a breakpoint in your JavaScript code and it would stop there and then you can inspect variables
in.
I want all the biggest and best yet in individual individuals to do good.
I'm not sure how it is handled and individuals to difficult, but I think I take note of your point
and we'll get it back to you, since it is not an agenda that we have to consider in the.
And the bottom line is, yes, we have the invigilators to do can be very open.
But if you hold this goal in the system, I don't know how to behave in Karani Open.
Yes.
The in the end, the top of the place, just your terminal.
Have a concert.
You see it?
Yes.
The concert is OK.
Is that all?
No, no.
It will work and when you run the court look and you see there is better run and the right side to the
right side than the top
is when you can get out of the car.
Luckily.
OK, but it is it is not like this.
It is designed going to be running inside the system outside.
If you ride a bicycle and independent of Phoenix and trap it, it will develop here in visual studio,
but it since it is dependent on therapy and in the system, you cannot be back here.
I think.
Yeah, I don't think this debacle will work with this kind of code is how I do this.
Let me see whether our attempt to answer the question, how I normally do this in, for instance, my
code is working and I don't know what's going on.
I do this manually.
For instance, I can come here and try to print this one because of just the way we do in Python.
If I print at this point, I'll be able to see the console here, what it is with this printing, so
I can know if, for instance, I could just come here and do print and then I pass.
I pass.
I pass this.
Yeah.
And then I call this is one case.
So if I call, I call this function, I expect that here I have something that is printed and
there should be something printed here and I think my management to be a member.
So on the console here, you are able to see whether whether your functions are working.
If you need you need the immediate you needed to return some data and it's not returning.
You're able to know at whatever point.
So if this works, I can move this thing to another line.
I can just delete it from here and maybe take it down to another place like here so as to check whether
maybe the brick is coming down somewhere here.
So that's how I normally do.
We want other techniques that other than paint.
Well, most of the time I use print, print when I if I don't use print, I just go to the console here.
I take what it is doing.
You see, like, no, this this is what this didn't give me here.
I can check what what I have in the console.
So most of the time when I'm debugging, I check the console out to see what's happening.
Yeah.
OK, can we use the print message.
Print the message.
Print.
Yes.
Not to give you a dialogue.
You can use message print but but now that the limitation with that is if you are using a postman to
send an EPA request message, print is not going to be OK.
You know, practice and oracle, they create the table to debug the insert message and from the code
and the insert the result in the custom table.
Yeah, that is done if maybe your application is in production, but if it is in development mode,
you don't need to do that production.
For instance, if you're using golden era, you want as a developer when you come back or when you hear
the complaint, you want to just have a place where you will go and find exactly what happened.
So the way you are.
You could have printed here.
You could have.
Yeah.
If there's a break, you can just use that to get into a type of player into it to give you a message
with the details of what happened.
OK, yeah.
OK, great.
So we can move on.
The other thing is.
Sorry.
Go ahead.
Sorry.
OK.
The other thing is arithmetics.
So in our, in our library article we called it a library article.
It I added in the duct tape, this is just for the purposes of testing.
It may not make sense the software.
So I added article post and I the delivery cost and I want this total cost to be calculated automatically
when I put the in price here.
So if I come here maybe two, one thousand and I do hear something like 10, I want this out to compute
the total compute the total cost.
So there are two ways of doing that.
The first one is by using using a custom script, the front end.
That's our form script.
So we can go to our library to use file
in the library.
Yes, I have this.
And we had one moment Mujib's.
OK, so we have we have we have this function that I wrote, I wanted this to happen before Steve the
day before Steve, I got it from from there documentation.
And this is not.
Yeah.
Actually, is it here before severe.
So this is where I got it.
So I want this thing to happen just before I save, I save my document and then I'm getting the article
cost passed.
This is a devastated function to make sure we pass the integer and we can remove it to see what happens
without it when we first of all, see with it.
And then of course, I remember the very function that we are using city value, total cost to the total
cost that we have here.
So right now, if I come to my app and save this one is adding the one thousand and the ten to make
dentin.
If maybe this was one hundred and I save, it's putting it to the end that only in the database.
So even if you refresh, our value is not going to get lost because it has been saved.
It has been computed just before save and then we have saved it when you are saving the rest of the
phone.
So before you ask your questions, why do they have to do this?
Let me just remove so that in case you find this error, you remember what we are doing here.
Suppose I did nothing saved and they came here and saved this thing again.
Maybe I can get this back to Ben.
Is it working so hard to work so ideally what we supposed to know?
I know why this is so sometimes we need to redo this.
So now I can do 100 save.
You see how this one, this one is doing?
So, again, this is JavaScript.
So the reason why they seem like it is working is because I hadn't not rerouted my phone.
So you have to reload for it to walk in Aruba without using us added these things.
It has just taken this one and appended at the end of the one thousand to make it some weird figure
here.
That is about one million and something.
So one thousand plus plus 100 is giving us this.
So that's wrong.
That's wrong.
So is doing this ideally because these are devastating?
Remember, this is this is a data field which is which produces a string.
This one is producing a string and therefore it's taking one string and adding to the end of the other.
So if you need to tell your code that this is this is an integer, you have to pass here an integer.
So.
So that is why we did that and saved.
And now when we come here, let me try this again.
See you see this again because you have no idea that the form is giving us 1000, 1000.
But if we at our form.
And we save it now we get 2000.
You can put it like you show, just you change the value it reflects in total cost, right?
Yeah, absolutely.
We did the way we did in the other eye here.
You can listen to this change.
You get to that and then you add it into that.
Yeah, you can do that here.
OK, he said very little how to do default, devalue current default so they default into it.
Even when you are, you are doing you a customized form.
The article caused here, you can put default, it is a default, you can just do zero.
Um, yeah.
S..
OK, so great what we have done that using using using a script, using a device, using a script that
is not as obviously but a cleansing script that is front and script.
What if we needed to do that, maybe with a python code?
There isn't much difference.
You go to this and then I think I had done it.
Yeah, I have it here so I can remove this.
Now, let's command this code to make sure it's not running.
And we can also comment.
This is the first.
So we need we need experts here,
so if we come to our.
Our phone here refresh.
And we remove this and save.
Nothing is happening, it's not saving this.
So if we do 2000 here and save, it's not computing.
So we just wanted to make sure that this is what is running.
So here I have another function, because if this is not in Python, so this is happening after they've
almost been submitted before, it is saved in the in the bucket.
So here we are using self total cost equals this one.
I'm converting to float.
You can also convert it to an integer is no difference.
You can convert it to an integer.
The only difference is the blood flow to allow you to do something.
So this is at the all cost and then you add delivery costs.
So now hopefully this one this one has reloaded if we refresh this.
And we see no change in every move, want something there?
This one was not so.
This one is taking this value and this value and adding it to the python and then it is outputting it
here after it has been saved.
So the difference between the to what is happening here, these things are being submitted this and
this is being submitted to the back end.
And then this script is running just before this inserted into the database.
And then it is saving.
This one is saved to the database and then with the form reloads, this one is getting used for this
one from the database.
But in the in the in this one, this other thing, what's happening here before we send even to the
back end, we are getting reports in those two.
Then we said the total cost value here and then when we save it is getting the average from the front
end and saving it into the database.
So that's the difference between what is happening in the JavaScript and what is happening in the Python
code.
Is this I have a question, usually it comes to my mind how records get looking for a user.
How will I get the.
Lockard is.
Loped, what do you mean by locked?
Means, as you did in the application, you are putting some to go to the screen.
Here you are editing, for example, this record.
Yes.
When you are editing this record, it should be looked at in the database for you, only for editing.
If someone else tries to edit the same record, it will show him the record.
It's in open or in use, an error message telling that you cannot edit same recording at the same time.
This is what we call.
Sounds like that sounds like will move from the.
So the only thing I know money is to rock the field completely is permissions.
About how to locate on the to to locate what normal bodies can edit when is being edited.
I don't know that happens by default on Europeanised, but I'm not sure.
So we didn't face this before.
I have no that problem before.
Tending to think that is by default in Europe, next.
So we can we can explore and see where that is, it comes out of the box with something that you have
to do, something you love to do somewhere will check, which absolutely is.
OK, any question that is for this part, arithmetic and formula or we move to the next topic.
OK, go back to agenda, garani what what we will see today.
OK, so we we are not going to the sarva subscripts subscripts the.
OK, that's it, that's it, that's for sure.
So Sarva subscripts, let me close this.
I don't know that, but this can be found easily.
This again.
Can be found suitable scripts.
You need to go to the documentation to read this is quite the material here that you need to understand
it for you to do effective subscripts because you cannot actually cover anything on this on this here.
But just to point out, before you get what what is off script, ideally, if you remember, you are
doing we are doing something.
We are doing the dishes you are doing here.
We had something like custom custom scripts.
You remember these custom scripts.
We said that we are not going to be doing our custom scripts here because we don't want them to get
lost.
Sometimes we may be needing to test something quickly and you need to write a quick Sahba script.
Like, for instance, I have written one script, so if I go here, this another another another another
script written for for you to write scripts and is here.
I have written one for a test in how how we are going to do this is I want in the let me duplicate this
so they don't lose it in the membership.
So library membership list.
I work in the library membership list if they use it.
When you are saving this member.
When I am adding a member here I want if maybe I select a second.
Remember, this is just for the purposes of this tutorial you can tweak it is to do whatever you want
to do.
I want this button to be automatically checked to pay it.
So if the member here, if the member here is one, this is not going to be checked.
But if the member is too, I want this to automatically be changed to two paid.
So if I save this, you see this one is marking this speed before I submit, if maybe I change it to
one and save his unmaking, it is taking there.
So this one has not paid.
So I have done this using Iosava script and what they have done if you go to the script section.
There are a few things you are supposed to select here, the first thing is this script type and here
we have a number of things.
Duct tape event means this this of a script is going to be executed on a dog type event.
Like when, for instance, when I save this member, when I save them, I remember here when I save
a member that is a DOCTYPE event when I did a member like this one update.
This is a duct tape event.
So this is a duct tape event.
You can do it on a scheduled event.
We are going to be able to see what our schedules in the advanced topics permission query or an API.
So on an EPA event or in an EPA is called Do Something Here.
And then the next thing that I selected here.
Is a preference doctype, so I selected here our library, our library membership, our library membership
form, and then here you select the doctor again.
You remember these ones when you are doing our good at the party.
We had this function before save after save on update this this is what you are going to select here.
So I wanted to do this before save.
So before I save check whether the member selected is this one.
And then I did something else to do another value.
You have all these functions here, you can explore them by yourself and you can try to do something
on each of them.
So then this script that is here is Python code.
So this is not JavaScript.
This is Python.
So you're going to be writing Python on this script.
So the scripts are going to be taking in Python code.
So here you are seeing if Dr. Triboro remember remember this doc?
We we had it when you are doing we were doing JavaScript in Scav in the form script, the library member.
Is this field here.
Remember?
So if that library member is increase the zoom out June 30.
So, yes, it's OK.
So if it broke, you remember the doc in our in our form for our scripts.
The library member I was saying I remember is this mamby here?
This one in your phone is this.
So this one I have just had it a volume then update the doctor to get one otherwise updated to zero.
And that's it, and then you see there are few things, although you need to know.
And you zoom out here.
My skin is freezing.
I thought, oh, good.
So let me zoom out this way.
This disabled button on top here.
Make sure that every time you write yourself a script.
Is is not check if you check this button and you see.
And then you come here and then I set to see, you see, it doesn't work.
This one is not being marked.
Our speed, our code is there.
Everything is the ability to three.
Nothing happens.
Get it back to two.
Nothing happens.
The only reason is because this one is checked as disabled.
So you have to make sure that this button is not checked.
And then the other thing that you need to do before you are, you start writing yourself a script,
make sure that you enable them inside of your site.
And you're going to see that when you're going through this documentation, so there is this, this,
this, this quote here to run it.
So it's saying anybody have a script?
You have to do this for you to be able to run our scripts.
And even before you run this, you have to have all your code.
And specifically on your site, you need to have in the set config, you need to have this development
set to one.
So if care is not that one, you will not be able to run a script.
And then after you have said development to one, the next thing is to go to the documentation, copy
this command and run it on your site.
Of course, remember to change, they say to the local into you the name of your site, and then now
you'll be able to go into the Asaba scripts and write your custom subscript in question up to the.
Please share the link, Obstreperousness said, but OK, I'm dropping that into the chat now.
Yeah.
So maybe before, before, before I take questions, let me let me just make this as as as not as disabled,
then let me read this to make sure it is not working so I can just check.
I remember one.
Nothing happens.
I remember, too.
Nothing happens.
So what I want to do I want to put this quote.
Into our python, into our python code at the back end.
So how you do that?
Any clues that and this is the library membership's you need to be to make sure that you are in the
library membership DOCTYPE and then you go to library membership to pay.
And then you can just take this call.
So there's not much difference, I just want to highlight this without, you know, are you can copy
that.
And instead of here, I can predict what they have come.
I have copied.
And then this is supposed to be properly indented.
This book you our we here is complaining that he doesn't know what is doc, and this is because this
is this is Python.
I don't know what this doc doc is of the on the front end by JavaScript.
So if you want to read this thing here, you are going to use this self.
So instead of doc, you're going to have self, self and self.
So if I do that and I save this code, I'm hopeful is supposed to work the same way.
So if I wrote my.
If I rode here and I change this to one, OK, if I change this back to two, this one is Muglia, correct.
So this now is being marked by our Baydon.
So if you want to read some scripts on the side of you, are you are you are you are put on code.
This is how you do it.
Just make sure you replace dog with self.
So now we can we can take questions.
Yes.
Yes, any question?
OK, now you have done it by fire and you have set up a script, right?
Yes.
So they are running together or one minute and one or all together, they will run.
If you are caught there and could here, all will be run.
Who is FirstRand?
So if you don't need to play because they are doing the same thing, only that this one is stuffed into
the database.
But this one you have it on.
You are on.
You are cold.
So you can push it to GitHub.
So this one is disabled.
I mean this one is not running.
Saw before, before I put this one here it tested just to make sure that this one is not running.
It was not updating our it was not updating our speed to one.
So when we put our code here, let me let me just repeat this.
So let me do pass my question now.
If you have two places but have two functions to execute.
One is in front end and the other one is in the back.
And who is running first?
Well, you you are aware, first of all, money to you, you don't have to put them, you don't have
to put one's JavaScript doing the same thing on the front end and another one is that one on the bucket.
There's absolutely no reason to do that.
No, not exactly in different God, there is.
I don't know why you why the other service script, by the way.
And if there is a reason otherwise, the control file and that's why they add Adam circumscription,
what Europeanised is trying to do.
You see, they call them said not frappé.
They call themselves a framework with the batteries included.
They want to they want to make sure that most of the work can be done from the front end without having
to go to their files.
And this happens mostly when maybe you have a team of developers who maybe you have a new development.
You are not sure whether they are they can do the right thing.
You don't want them to go to the code that has been written.
Some when you when you continue writing this code this way as some of these files are going to get extremely
big.
So you don't want someone who doesn't know what they are doing to come into our finances.
It means that editing things so you can just ask them to do it on our own as a script on the front end.
If it works, you put it to the back end.
So there is one.
Why this one is discouraging when you as you grow is because this code cannot be tracked on GitHub.
This one is getting saved into a database.
And if you lose your A database collusive in the code.
So you can imagine if you had like one of those lines of code here on this on this script doing different
things and then something happens and you lose everything.
You have to get a developer to redo the whole of the whole logic again.
So it is advised strongly, right, all these things on the back end, because this can be tracked with
so many other put tracking applications of the other.
Great.
So in this case, how you move the ceremony script.
To other this manually.
Yes, like this one, I just copied and moved manually, but if you if not now, if you know exactly
what you'll be doing, you don't even need to come and do it right here.
Right.
You can straight away and start writing it on the back end here.
Yeah.
Great.
Excellent.
OK, so we are we are we are done with the group I think.
Yes.
Or any time it's available to polysyllables whatever custom doctype or standard to time, whether it
is custom made or not.
Custom and all types are available under a separate script, right.
Yes.
We have all of them here.
So any specific usage is, according to you, where you are using service most.
Yeah, ideally it is, it is it's just like a like when you are, you know, these things mostly how
I do them, I do every python I need to do.
I do it on the on the files here.
So if I need to do anything before before my phone received, I write all the logic before, see if
maybe it is after this if I write a function for the same.
So I do basically all these things on this Python Python API based on the file of every DOCTYPE here.
OK, so now the question, ladies and gentlemen.
Is it clear what?
Well, Kiran, if you can share with us some of the most frequently codes useful to the.
I didn't hear.
I didn't hear you, we're going to come again.
I'm saying, if you can share with us most frequently used codes or the ones that are very useful to
be used and usually your human code snippets, right?
Sanford, of course.
Yes.
Most frequent codes.
OK, I can take that.
And then we we are going to be sharing as we move along.
Yes, yes, good, good question, actually, I request you guarantee later to open a standard called
the code or from the code and we will try to understand or my target is I'll be able to read and understand
what they are doing in this code.
Yes.
If you are able to read from penal code, you can read.
Do you understand what they want to do, what they want to reach, how they prepare.
So if you start somewhere, you can grab or grab from a therapy team, work and do it for you.
Yeah, this decanters, this is what I do.
But we learn we learn from the source code.
We learn we should be able to learn from the source code.
Those cases are thousands.
Millions of cases cannot see everything.
But we are able to read the code and understand the.
This is.
We complete maybe 70 percent of the work.
Yeah, and just one more thing.
Yeah, so Karani, the Colts code, which you have written the code snippets, if you can take a screenshot
of those and then use some arrows to explain that this is a frame, what method?
And this is a python method.
And this is an even though we know what is Enescu and Python, but some of the frappé methods are unknown
to us.
Like if you point out after taking a picture, of course, it could be easier for us to understand.
It's just I'm just adding to what an awful just now mentioned so that we can understand directly from
the code like which belongs to which part.
OK, ok, ok.
Yeah.
He's doing actually this as if you play the video, you will understand where it is.
What is this line.
What is this code.
What is this python method.
But will later will do again.
Will take a code from your next and he will explain like go block by block or line by line to understand
what is it exactly.
It's a good practices.
OK, I now have a question so I know this is the end of week and maybe in your place, is that.
I understand the power is very low, there is no power.
Uh.
Shall we close the call or e-mail question?
I want to ask some questions related to today's topic and not related to topics, no.
Is it related to AARP next?
Yes, yes.
I'm sure.
At least send an e-mail and send it by email.
We'll take it offline if there is any.
Because I got a question also from other attendees.
And you reply here, if it is, it will take on time.
If it is not covered, we can point you or give you specific help.
Send it by email.
Yes.
OK, fine.
So.
Any other question?
Thank you, thank you, thank you, thank you very much.
And see you next Monday, inshallah, the same time we will continue.
Oh, yes, yes, yes, yes.
No, no, no question.
OK.
Thank you.
I've been to hear your voice.
And I would like to thank you all for attending and have a nice weekend.
Yeah, I think you're going to come and me and if you are there, can you check the chat box?
I have included a picture.
So I was thinking along these lines.
So it's something different.
But he can mention that this is a function and this this code does this and that.
Like just for two, three sample code, which he has written just now, which granny has written.
So they could be like you could be easier for us to understand.
You want some documentation, right?
Yeah, something not just the court, which he has written like this, but I think.
The one for which we used for the API polling data from the API.
We've got to do it is OK?
Yeah, yeah.
That's how we discovered the structure and the structure of the car, the main main plugs made keywords.
Yeah, exactly.
Thank you.
OK.
Yeah, eBay gave over.